package com.tanxi521.tnlevel.utils;

import com.tanxi521.tnlevel.pojo.PlayerLevel;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Author: i-xiaotian
 * @Date: 2022/3/14 13:55
 * @EMAIL: 1254806967@qq.com
 */
public class BaseUtil {
    public static void printPlayerLevel(CommandSender sender, PlayerLevel playerLevel) {

        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        sender.sendMessage("§2================[等级系统]================");
        sender.sendMessage("玩家uuid: " + playerLevel.getUuid());
        sender.sendMessage("玩家名称: " + playerLevel.getDisplayName());
        sender.sendMessage("玩家等级: " + playerLevel.getPlayerLevel());
        sender.sendMessage("玩家经验: " + playerLevel.getPlayerExp() + "/" + playerLevel.getPlayerExpToNextLevel());
        sender.sendMessage("玩家总经验 " + playerLevel.getPlayerTotalExp());
        sender.sendMessage("上次获得经验时间: " + format.format(new Date(playerLevel.getGMTUpdate())));
        sender.sendMessage("等级初始化时间 " + format.format(new Date(playerLevel.getGMTCreate())));
        sender.sendMessage("§2================[等级系统]================");
    }

}
